import { login, getUserInfo } from '@/api/user'
import {TokenKey} from '@/config/index.js'
export default {
	namespaced: true,
	state: {
		orderBaseInfo:uni.getStorageSync('orderBaseInfo')||{
			product:{},
			market_goods_id:null,
			count:0,
			order_type:1
		}
	},
	mutations: {
		CONFIRM_ORDER(state,data){
			state.orderBaseInfo=data;
			uni.setStorageSync('orderBaseInfo',data);
			uni.navigateTo({
				url:'/pages/order/orderSubmit'
			})
		}
	},
	actions: {
		//确认订单
		confirmOrder({commit},data){
			return new Promise((resolve,reject)=>{
				commit('CONFIRM_ORDER',data);
				resolve(true);
			})
		},
	}
}
